<template>
  <div class="search">
    <span class="iconfont">&#xeb86;</span><input type="text" :placeholder="text">
  </div>
</template>

<script>
import { toRefs } from '@vue/reactivity'
export default {
  name: 'Search',
  props: ['placeholder'],
  setup (props) {
    const { placeholder } = toRefs(props)
    const text = placeholder.value
    return { text }
  }
}
</script>

<style lang='scss' scoped>
@import '../../assets/style/public.scss';
.search{
  width: 100%;
  height: 100%;
  background-color: $search-color2;
  border-radius: 16px;
  display: flex;
  align-items: center;
  .iconfont{
    margin: 0 .12rem 0 .16rem;
    color: $search-color;
    font-size: .22rem;
  }
  input{
    font-size: .14rem;
    color: $search-color;
    border: none;
    outline: none;
    background-color: $search-color2;
  }
  input::-webkit-input-placeholder{
    color: $search-color;
  }
}
</style>
